package cn.factorybox.item.service;

import cn.factorybox.model.entity.Company;
import cn.factorybox.model.entity.User;
import cn.factorybox.model.entity.UserUpdate;

import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;

/**
 * @author flypig
 * @version 1.0
 * @date 2020-03-28 11:12
 */
public interface UserService {
    int register(User user);

    int deleteUser(String id);

    String updateUser(User user) throws Exception;

    User selectUser(String uName, String uPass, String ip);

    Map<String, Object> selectList();

    int saveMaster(User user);

    void insertSubUser(HttpServletRequest request, Integer number) throws Exception;

    List<User> selectSubUserList(HttpServletRequest request) throws Exception;

    List<User> selectAllMaster();

    User getMasterBelong(HttpServletRequest request) throws Exception;

    Company getCompanyBelong(HttpServletRequest request) throws Exception;

    int deleteMaster(String id);

    User selectUserWithoutIp(Map<String,Object> map);

    Map<String,Object> checkUserName(String username);
}
